﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Entity.Car_Rental.News>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        添加新闻</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <%: Html.HiddenFor(model => model.NewsID) %>
        <div class="editor-label">
            标题
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Title) %>
            <%: Html.ValidationMessageFor(model => model.Title) %>
        </div>
        <div class="editor-label">
            内容介绍
        </div>
        <div class="editor-field">
            <%: Html.TextAreaFor(model => model.InfoSummary, new { rows = "5", cols = "50" })%>
            <%: Html.ValidationMessageFor(model => model.InfoSummary) %>
        </div>
        <div class="editor-label">
            内容详细
        </div>
        <div class="editor-field">
            <%: Html.TextAreaFor(model => model.Info, new { rows = "16", cols = "100", @class = "xheditor" })%>
            <%: Html.ValidationMessageFor(model => model.Info) %>
        </div>
        <div class="editor-label">
            状态
        </div>
        <div class="editor-field">
            <%: Html.StatusForSelectList() %>
        </div>
        <div class="editor-label">
            显示日期
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.DisplayDate) %>
            <%: Html.ValidationMessageFor(model => model.DisplayDate) %>
        </div>
        <p class="button-span">
            <%=Html.CreateButton(Common.Background.Entity.UserOperatorRole.AddEvent) %>
        </p>
    </fieldset>
    <% } %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script src="../../Scripts/My97DatePicker4.7/WdatePicker.js" type="text/javascript"></script>
    <script>
        $(function () {
            $("#DisplayDate").click(function () {
                new WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' });
            })
        });
    </script>
</asp:Content>
